package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderSettingMapper {

    // 根据月份查询预约设置数据
    //@Select("select * from t_ordersetting where orderDate between #{date} and #{date} + interval 30 day")
    //List<OrderSetting> getOrderSettingByMonth();
    @Select("select * from t_ordersetting where" +
            " orderDate between #{date} and #{date} + interval 30 day")
    List<OrderSetting> getOrderSettingByMonth(String month);

    // 根据预约日期修改预约人数
    void editNumberByOrderDate(OrderSetting orderSetting);


}
